//
// This file is part of an OMNeT++/OMNEST simulation example.
//
// Copyright (C) 1992-2015 Andras Varga
//
// This file is distributed WITHOUT ANY WARRANTY. See the file
// `license' for details on this and other legal matters.
//

package node;

//
// Application model to generate traffic for the network.
//
simple App like IApp
{
    parameters:
        int address;  // local node address
        string destAddresses;  // destination addresses
        volatile double sendIaTime @unit(s) = default(exponential(1s)); // time between generating packets
        volatile int packetLength @unit(byte);  // length of one message (fixed! no "volatile" modifier)
        @display("i=block/browser");
        @signal[endToEndDelay](type="simtime_t");
        @signal[hopCount](type="long");
        @signal[sourceAddress](type="long");
        @statistic[endToEndDelay](title="end-to-end delay of arrived packets";unit=s;record=vector,mean,max,min;interpolationmode=none);
        @statistic[hopCount](title="hop count of arrived packets";interpolationmode=none;record=vector?,mean,max);
        @statistic[sourceAddress](title="source address of arrived packets";interpolationmode=none;record=vector?);
        
        //myadd
        @signal[sendCount](type="long");
        @statistic[sendCount](title="send count";interpolationmode=none;record=count);
        @signal[receiveCount](type="long");
        @statistic[receiveCount](title="receive count";interpolationmode=none;record=count);
        
        @signal[to0Delay](type="simtime_t");
        @statistic[to0Delay](title="end-to-end shake of arrived packets";unit=s;record=vector,mean,max,min;interpolationmode=none);
        @signal[to1Delay](type="simtime_t");
        @statistic[to1Delay](title="end-to-end shake of arrived packets";unit=s;record=vector,mean,max,min;interpolationmode=none);
        @signal[to2Delay](type="simtime_t");
        @statistic[to2Delay](title="end-to-end shake of arrived packets";unit=s;record=vector,mean,max,min;interpolationmode=none);
        @signal[to3Delay](type="simtime_t");
        @statistic[to3Delay](title="end-to-end shake of arrived packets";unit=s;record=vector,mean,max,min;interpolationmode=none);
        @signal[to4Delay](type="simtime_t");
        @statistic[to4Delay](title="end-to-end shake of arrived packets";unit=s;record=vector,mean,max,min;interpolationmode=none);
        @signal[to5Delay](type="simtime_t");
        @statistic[to5Delay](title="end-to-end shake of arrived packets";unit=s;record=vector,mean,max,min;interpolationmode=none);
        @signal[to6Delay](type="simtime_t");
        @statistic[to6Delay](title="end-to-end shake of arrived packets";unit=s;record=vector,mean,max,min;interpolationmode=none);
        @signal[to7Delay](type="simtime_t");
        @statistic[to7Delay](title="end-to-end shake of arrived packets";unit=s;record=vector,mean,max,min;interpolationmode=none);
        @signal[to8Delay](type="simtime_t");
        @statistic[to8Delay](title="end-to-end shake of arrived packets";unit=s;record=vector,mean,max,min;interpolationmode=none);

   gates:
        input in;
        output out;
}


